From: Johannes Demel Date: Mon, 15 Jun 2020 21:14:26 +0000 (+0200) Subject: [PATCH 7/9] fix: Adjust min/max for 32f_s32f_convert_8i kernel X-Git-Tag: archive/raspbian/2.3.0-3+rpi1^2~6 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ff13c359328d097d5a5da5640376b6b0ce6f9423;p=volk.git [PATCH 7/9] fix: Adjust min/max for 32f_s32f_convert_8i kernel This kernel used `CHAR_MIN` to determine the minimum value which may be 0. It is expected that this value is -127. Thus, we move to `INT8_MIN`. Fix #390 Gbp-Pq: Name 0007-fix-Adjust-min-max-for-32f_s32f_convert_8i-kernel.patch --- diff --git a/kernels/volk/volk_32f_s32f_convert_8i.h b/kernels/volk/volk_32f_s32f_convert_8i.h index 242c3bd..ea16ef8 100644 --- a/kernels/volk/volk_32f_s32f_convert_8i.h +++ b/kernels/volk/volk_32f_s32f_convert_8i.h @@ -78,8 +78,8 @@ static inline void volk_32f_s32f_convert_8i_single(int8_t* out, const float in) { - float min_val = CHAR_MIN; - float max_val = CHAR_MAX; + float min_val = INT8_MIN; + float max_val = INT8_MAX; if (in > max_val) { *out = (int8_t)(max_val); } else if (in < min_val) {